<script type="text/javascript">


    //删除回调
    $('#tabledit1').on('afterdelete.bjui.tabledit', function(e) {
        var $tbody = $(e.relatedTarget)

        console.log('你删除了一条数据，还有['+ $tbody.find('> tr').length +']条数据！')
    })
</script>
<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="/gridFieldSys/queryList" method="post">
        <div class="bjui-searchBar">
            <label>字段名称：</label><input type="text" value="${bo.fieldCaption!""}" name="fieldCaption" size="10">&nbsp;
            <label>字段属性：</label><input type="text" value="${bo.fieldName!""}" name="fieldName" size="8">&nbsp;
            <input type="hidden" name="gridId" value="${bo.gridId?c}">
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <a class="btn btn-orange" href="javascript:;" onclick="$(this).navtab('reloadForm', true)" data-icon="undo">清空查询</a>&nbsp;
            <div class="alert alert-info search-inline"><i class="fa fa-info-circle"></i> 双击行可编辑</div>&nbsp;
            <button type="button" class="btn-green" data-toggle="tableditadd" data-target="#tabledit1" data-num="1" data-icon="plus">添加编辑行</button>&nbsp;
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <form action="/gridFieldSys/save" id="j_custom_form" class="pageForm" data-toggle="validate" method="post">
        <table id="tabledit1" class="table table-bordered table-hover table-striped table-top" data-toggle="tabledit" data-initnum="0" data-action="/gridFieldSys/saveSingle" data-single-noindex="true">
            <input type="hidden" name="gridId" value="${bo.gridId?c}">

            <thead>
            <tr data-idname="#index#.gridId">
                <th title="id"><input type="text" readonly="readonly" name="#index#.id"   value="" size="20"></th>
                <th title="字段名称"><input type="text" name="#index#.fieldCaption"  data-rule="required" value="" size="20"></th>
                <th title="字段属性"><input type="text" name="#index#.fieldName" data-rule="required" value="" size="20"></th>
                <th title="显示顺序"><input type="text" name="#index#.displayOrder" data-rule="digits,required" value="" size="20"></th>
                <th title="显示宽度"><input type="text" name="#index#.width"  data-rule="digits,required" value="" size="20"></th>
                <th title="" data-addtool="true" width="100">
                    <a href="javascript:;" class="btn btn-red row-del">删</a>
                </th>
            </tr>
            </thead>
            <tbody>
            <#list pageInfo.list as item>
            <tr data-id="${bo.gridId?c}">
                <td>${item.id?c}</td>
                <td>${item.fieldCaption}</td>
                <td>${item.fieldName}</td>
                <td>${item.displayOrder?c}</td>
                <td>${item.width?c}</td>
                <td data-noedit="true">
                    <button type="button" class="btn-green" data-toggle="doedit">编辑</button>
                    <a href="/gridFieldSys/del?id=${item.id?c}" class="btn btn-red row-del" data-confirm-msg="确定要删除该行信息吗？">删</a>
                </td>
            </tr>
            </#list>

            </tbody>
        </table>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-close" data-icon="close">取消</button></li>
        <li><button type="submit" class="btn-default" data-icon="save">全部保存</button></li>
    </ul>
</div>